package com.rs.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 举升状态
 *
 * @author zhouwz
 * @date 2020/7/16 13:08
 */
@AllArgsConstructor
public enum LiftStatus {
    /**
     * 举升状态
     */
    UP(1, "举"),
    DROP(0, "落"),
    ERROR(-1, "无"),
    ;
    @Getter
    private final Integer code;
    @Getter
    private final String msg;

    public static LiftStatus getLiftStatus(Integer code) {
        for (LiftStatus item : LiftStatus.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return ERROR;
    }
}
